import axios from 'axios';

export const getArticleDetail=(data)=>({
    type:'GET_ARTICLE_DETAILs_DATE',
    data
})
export const getDetail =(id) => {
    return(dispatch) => {
        axios.get('/api/getArticleDetail.json?id=' + id).then((res)=>{
            const data = res.data.data;
            dispatch(getArticleDetail(data))
        }).catch(()=>{
            console.log('接口请求失败！！！')
        })
    }
}